package cate.game.role.pvp.videohall.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBVideoHall;
import easy.java.dev.note.NoteField;
import easy.java.practice.errorcode.EcResult;

@ClientMsg(title = "取消收藏录像 の 请求")
public class CancleCollectVideoReq implements MsgInput {
    @NoteField(value = "录像id")
    public String replayUid;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        EcResult<Void> r = cc.getRole().getPvp().videoHall.cancleCollect(replayUid);
        if(!r.ok()){
            game.notice.message(cc.getRole(), r.message);
        }
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBVideoHall.CANCLE_COLLECT_REQ;
    }
}
